
#ifndef __SOUCAREER_CRAWL_PAGE_FETCHER_H
#define __SOUCAREER_CRAWL_PAGE_FETCHER_H

#include "../../../third_party/curl/include/curl/curl.h"
#include <string>
using std::string;

class PageFetcher
{
 public:
  PageFetcher();
  ~PageFetcher();
  bool Fetch(const string &url, string *page_content);
 private:
  CURL *curl_;
  CURLcode res_;
  static size_t Callback_(void *buff, size_t size, size_t nmemb, void *out);
};

#endif //__SOUCAREER_CRAWL_PAGE_FETCHER_H
